package com.healthysys.backend.controller;



import com.healthysys.backend.service.MenuService;
import jakarta.annotation.Resource;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import pojo.dto.UpdateMenuDTO;
import pojo.entity.Menu;
import pojo.result.PageResult;
import pojo.result.Result;


@RestController
@RequestMapping("/menu")
public class MenuController {

    @Resource
    private MenuService menuService;

    @GetMapping
    public PageResult<Menu> getMenuListPage( Integer pageNum, Integer pageSize){
/*        pageNum=1;
        pageSize=100;*/
        return menuService.getMenuListPage(pageNum,pageSize);
    }

    @PutMapping
    private Result<Void> updateMenu(@RequestBody UpdateMenuDTO updateMenuDTO){
        return menuService.updateMenu(updateMenuDTO);
    }
}
